package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_sly_sz database table.
 * 
 */
@Entity
@Table(name="per_sly_sz")
@NamedQuery(name="PerSlySz.findAll", query="SELECT p FROM PerSlySz p")
public class PerSlySz implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="PER_SLY_SZ_SZID_GENERATOR", sequenceName="SEQ1",allocationSize=1,initialValue=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PER_SLY_SZ_SZID_GENERATOR")
	private int szid;

	private String szname;

	private String szrem;

	//bi-directional many-to-one association to PerSlySbe
	@OneToMany(mappedBy="perSlySz")
	private List<PerSlySbe> perSlySbes;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="PER_EMPID")
	private PerPmsEmp perPmsEmp1;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="EMPID")
	private PerPmsEmp perPmsEmp2;

	//bi-directional many-to-one association to PerSlySzx
	@OneToMany(mappedBy="perSlySz")
	private List<PerSlySzx> perSlySzxs;

	//bi-directional many-to-one association to PerSlyWags
	@OneToMany(mappedBy="perSlySz")
	private List<PerSlyWags> perSlyWags;

	public PerSlySz() {
	}

	public int getSzid() {
		return this.szid;
	}

	public void setSzid(int szid) {
		this.szid = szid;
	}

	public String getSzname() {
		return this.szname;
	}

	public void setSzname(String szname) {
		this.szname = szname;
	}

	public String getSzrem() {
		return this.szrem;
	}

	public void setSzrem(String szrem) {
		this.szrem = szrem;
	}

	public List<PerSlySbe> getPerSlySbes() {
		return this.perSlySbes;
	}

	public void setPerSlySbes(List<PerSlySbe> perSlySbes) {
		this.perSlySbes = perSlySbes;
	}

	public PerSlySbe addPerSlySbe(PerSlySbe perSlySbe) {
		getPerSlySbes().add(perSlySbe);
		perSlySbe.setPerSlySz(this);

		return perSlySbe;
	}

	public PerSlySbe removePerSlySbe(PerSlySbe perSlySbe) {
		getPerSlySbes().remove(perSlySbe);
		perSlySbe.setPerSlySz(null);

		return perSlySbe;
	}

	public PerPmsEmp getPerPmsEmp1() {
		return this.perPmsEmp1;
	}

	public void setPerPmsEmp1(PerPmsEmp perPmsEmp1) {
		this.perPmsEmp1 = perPmsEmp1;
	}

	public PerPmsEmp getPerPmsEmp2() {
		return this.perPmsEmp2;
	}

	public void setPerPmsEmp2(PerPmsEmp perPmsEmp2) {
		this.perPmsEmp2 = perPmsEmp2;
	}

	public List<PerSlySzx> getPerSlySzxs() {
		return this.perSlySzxs;
	}

	public void setPerSlySzxs(List<PerSlySzx> perSlySzxs) {
		this.perSlySzxs = perSlySzxs;
	}

	public PerSlySzx addPerSlySzx(PerSlySzx perSlySzx) {
		getPerSlySzxs().add(perSlySzx);
		perSlySzx.setPerSlySz(this);

		return perSlySzx;
	}

	public PerSlySzx removePerSlySzx(PerSlySzx perSlySzx) {
		getPerSlySzxs().remove(perSlySzx);
		perSlySzx.setPerSlySz(null);

		return perSlySzx;
	}

	public List<PerSlyWags> getPerSlyWags() {
		return this.perSlyWags;
	}

	public void setPerSlyWags(List<PerSlyWags> perSlyWags) {
		this.perSlyWags = perSlyWags;
	}

	public PerSlyWags addPerSlyWag(PerSlyWags perSlyWag) {
		getPerSlyWags().add(perSlyWag);
		perSlyWag.setPerSlySz(this);

		return perSlyWag;
	}

	public PerSlyWags removePerSlyWag(PerSlyWags perSlyWag) {
		getPerSlyWags().remove(perSlyWag);
		perSlyWag.setPerSlySz(null);

		return perSlyWag;
	}

}